<cfparam name="for_recid" default="">
<cfparam name="wasdoing" default="dod">
<cfparam name="item_name" default="">
<cfparam name="for_c" default="dod">
<cfparam name="for_a" default="deal">
<cfparam name="islocked" default="0">

<cfif isdefined('form.meta_title')>
<cfinvoke component="cfcs.common.metadata" method="insertmetadata" for_recid="#for_recid#" for_c="#for_c#" for_a="#for_a#" recid_var="#recid_var#" meta_title="#meta_title#" meta_desc="#meta_description#" meta_keywords="#form.meta_keywords#" meta_abstract="#form.meta_abstract#" islocked="#islocked#" allowedit="1" />
<div id="messages">Meta Tag Data was saved.</div>
</cfif>

<cfoutput><h2>Edit tags for #item_name#</h2></cfoutput>

<cfif wasdoing IS 'catalog_products'>
	<a href = "index.cfm?c=dod&a=catalog_products">Back to Deals</a>
</cfif>    
<cfif wasdoing IS 'recipes'>
	<a href = "index.cfm?c=recipes">Back to Recipes</a>
</cfif>

<cfinvoke component="cfcs.common.metadata" method="getMetaData" contenttype="1" for_recid="#for_recid#" for_c="#for_c#" for_a="#for_a#" returnvariable="qmeta" />

<cfoutput query="qmeta">
<form method="post" action="index.cfm?c=metadata&a=forrecid" name="editdata" id="editdata">
  <table width="800" border="0" cellspacing="0" cellpadding="6">
      <tr>
        <td>Title</td>
        <td><input name="meta_title" type="text" id="meta_title" size="45" value="#meta_title#" /></td>
      </tr>
      <tr>
        <td> Description</td>
        <td><textarea name="meta_description" id="meta_description" style="width: 250px; height: 50px;">#meta_description#</textarea></td>
      </tr>
      <tr>
        <td> Keywords</td>
        <td><textarea name="meta_keywords" id="meta_keywords" style="width: 250px; height: 50px;">#meta_keywords#</textarea></td>
      </tr>
      <tr>
        <td>Abstract</td>
        <td><input name="meta_abstract" type="text" id="mega_abstract" size="45" value="#meta_abstract#" /></td>
      </tr>
      <tr>
        <td>MSN Bot</td>
        <td><input name="meta_msnbot" type="text" id="meta_msnbot" size="45" value="#meta_msnbot#" /></td>
      </tr>
      <tr>
        <td>Google Bot</td>
        <td><input name="meta_googlebot" type="text" id="meta_googlebot" size="45" value="#meta_googlebot#" /></td>
      </tr>
      <tr>
        <td>Robots</td>
        <td><input name="meta_robots" type="text" id="meta_robots" size="45" value="#meta_robots#" /></td>
      </tr>
      <tr>
        <td>Image</td>
        <td><input name="meta_image" type="text" id="meta_image" size="45" value="#meta_image#" /></td>
      </tr>
      <tr>
        <td>Record ID:</td>
        <td><input name="for_recid" type="text" id="for_recid" size="45" value="#for_recid#" /></td>
      </tr>
      <tr>
        <td>Variable:</td>
        <td><input name="recid_var" type="text" id="meta_image3" size="45" value="#meta_image#" /></td>
      </tr>
      <tr>
        <td>Lock Record?</td>
        <td><label>
         
          <input type="checkbox" name="islocked" id="islocked" value="1" <cfif islocked IS 1>checked="checked"</cfif> /> 
          Check here to lock this record so it can only be changed on this form (don't allow auto-updates)</label></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
        <input type="hidden" name="for_c" value="#for_c#" id="for_c">
        <input type="hidden" name="for_a" value="#for_a#" id="dir">
        <input type="hidden" name="wasdoing" value="#wasdoing#" id="wasdoing">
        <input type="submit" value="Save Data" id="abutton" name="submitbutton"></td>
      </tr>
  </table>
</form>
</cfoutput>
